# -*- coding: utf-8 -*-
"""
Time    : 2024-4-16 10:56
ProjectName    : flask-pro-test
FileName    : __init__.py.py
"""

from flask import Blueprint
from flask_restx import Api, fields

# 创建蓝图
gallery_v1 = Blueprint("gallery", __name__)
# 引用api
gallery_api = Api(
    gallery_v1,
    version="1.0",
    title="Todo API",
    description="API 文档描述",
)

# 定义响应模型
# gallery_model = gallery_api.model(
#     "my_gallery",
#     {
#         "id": fields.String,  # 图片 ID，类型字符串
#         "name": fields.String(required=True),  # 图片名称，类型为字符串
#         "image": fields.String(required=True),  # 图片解析数据，类型为字符串
#         "account_status": fields.Integer(required=True),  # 图片状态
#     },
# )
# 在此处引用，避免引用循环报错
from .views import api as gallery_ns

gallery_api.add_namespace(gallery_ns, "/gallery")
